home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 039a / pdm_106.zip / PW20.PRG < prev    next >
Text File  |  1991-06-08  |  14KB  |  405 lines

  1.  
  2. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  3. * Program Name: PW20.PRG
  4. * Description.: Driver for PDM Menu System program
  5. * Language....: Clipper S'87
  6. * LIB required: CC.LIB v1.04, EXTEND.LIB
  7. * Gen Time....: 06/08/91 17:59:15
  8. * Generated by: PDM Sys - the ClipCode Pull Down Menu System  v1.06
  9. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  10. *** Set CLIPPER Environment ***
  11. SET CURSOR OFF
  12. SET DELETED ON                          && Filter out Deleted Records
  13. SET EXACT ON
  14. SET SCOREBOARD OFF
  15. SET SOFTSEEK OFF
  16.  
  17. PDMSETUP()
  18.  
  19. *** Set Color for Initial Screen ***
  20. SET COLOR TO ( PDM_CONFG[7] )
  21. @1,0 SAY REPLICATE( CHR( PDM_CONFG[8] ), 1840 ) && char for init screen
  22.  
  23. SET COLOR TO ( PDM_COLOR[1] )           && hcolor when not selected
  24. @ PDM_CONFG[2],00
  25.  
  26. SET COLOR TO ( PDM_CONFG[6] )           && color for init bottom panel
  27. @ PDM_CONFG[4],00
  28. @ PDM_CONFG[4],00 SAY PDM_CONFG[9]      && text for init bottom panel
  29.  
  30. MENUPD( 0, 0 )                          && just display h menu
  31.  
  32. PRIVATE key, hOpt, vOpt, pdSEL, sv_panel
  33. pdSel= 1
  34. DO WHILE .T.
  35.  
  36.   *SETCANCEL(.F.)                        && Disable alt-C interrupt
  37.   INKEY(0)
  38.   key= LASTKEY()                        && key= INKEY(0) misses alt-D
  39.   *SETCANCEL(.T.)                        && Enable alt-C interrupt
  40.  
  41.   DO CASE
  42.   *?*CASE key = 28                         && F1=Help
  43.  
  44.   *?*CASE key = -2                         && F3=Exit
  45.   ***  EXIT2DOS()
  46.  
  47.   CASE key = 27                         && Exit
  48.     PRIVATE Opts[2]
  49.     Opts[1]= "Yes"
  50.     Opts[2]= "No"
  51.      * Syntx: message text,       [ title,prmpts,colors,mRow,mColm,TmO ]
  52.     IF BOXMSG( "Exit Program to DOS?",.F., Opts ) = 1
  53.       EXIT
  54.     ELSE
  55.       LOOP
  56.     ENDIF
  57.   CASE key = -9                         && F10=Menu
  58.     hOpt=  1
  59.     vOpt=  0
  60.   *?*CASE key = 3                          && PgDn=Next
  61.   ***  SKIP 1
  62.   ***  IF EOF()
  63.   ***    BOXMSG( "At End-of-File" )
  64.   ***    SKIP -1
  65.   ***  ENDIF
  66.   *?*CASE key = 18                         && PgUp=Prev
  67.   ***  SKIP -1
  68.   ***  IF BOF()
  69.   ***    BOXMSG( "At Beginning-of-File" )
  70.   ***  ENDIF
  71.  
  72.   CASE ASCAN( PDM_HOTKY, key ) > 0      && If found, returns the ss
  73.     hOpt=  ASCAN( PDM_HOTKY, key )
  74.     vOpt=  1
  75.   OTHERWISE
  76.     LOOP
  77.   ENDCASE
  78.  
  79.   IF hOpt < 1
  80.     LOOP
  81.   ENDIF
  82.  
  83.   sv_panel= BOXSAVE( PDM_CONFG[4],00, PDM_CONFG[4],79 )
  84.   pdSel   = 1
  85.   DO WHILE pdSel <> 0
  86.  
  87.     pdSel= MENUPD( @hOpt, @vOpt )
  88.     IF pdSel > 0
  89.       DO CASE
  90.       OTHERWISE
  91.         * Syntx: message text/array, [ title,prmpts,colors,mRow,mColm,TmO ]
  92.         BOXMSG( "PDM Option Selected: "+LTRIM( STR(pdSel) ) )
  93.       ENDCASE
  94.     ENDIF
  95.   ENDDO WHILE pdSel <> 0
  96.   BOXREST( sv_panel )
  97.  
  98. ENDDO
  99. SET COLOR TO
  100. SET CURSOR ON
  101. CLEAR
  102. QUIT                                                    && End of: MAIN LINE
  103. *≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡*
  104.  
  105. *------------------------------------------------------------------------------*
  106. * Function....: PDMSETUP()
  107. * Purpose.....: UDF to Create PDMSETUP()
  108. * Parameters..: none
  109. * Generated by: PDM - the ClipCode Pull Down Menu System
  110. * Assumption..: the presence of these PUBLIC arrays:
  111. *             : <arrC>: PDM_HPROM = horizontal menu prompt text
  112. *             : <arrN>: PDM_HCOLM = horizontal starting columns for prompts
  113. *             : <arrC>: PDM_HTRIG = horizontal trigger letters
  114. *             : <arrN>: PDM_HTPOS = horizontal trigger letter positions
  115. *             : <arrN>: PDM_VSS1  = starting array subscript
  116. *             : <arrN>: PDM_VSS2  = ending array subscript
  117. *             : <arrC>: PDM_VPROM = vertical menu prompt text
  118. *             : <arrC>: PDM_VTRIG = vertical trigger letters
  119. *             : <arrN>: PDM_VCOLM = vertical starting columns for v prompts
  120. *             : <arrN>: PDM_VTPOS = vertical trigger letter positions
  121. *             : <arrL>: PDM_VACTV = vertical active status array
  122. *             : <arrC>: PDM_COLOR = PDM color strings for SET COLOR TO
  123. *                                     [ 1] hcolor when not selected
  124. *                                     [ 2] hcolor for unselected trigger
  125. *                                     [ 3] hcolor for selected option
  126. *                                     [ 4] hcolor for selected trigger
  127. *                                     [ 5] vcolor for box
  128. *                                     [ 6] vcolor when not selected
  129. *                                     [ 7] vcolor for unselected trigger
  130. *                                     [ 8] vcolor for selected option
  131. *                                     [ 9] vcolor for selected trigger
  132. *                                     [10] vcolor for inactive option
  133. *                                     [11] vcolor for message row
  134. *             : <arrC>: PDM_VMSSG = vertical message help text
  135. *             : <arrX>: PDM_CONFG = PDM configuration
  136. *                                     [1] = expN: box type: 0,1,2
  137. *                                     [2] = expN: row for horiz menu
  138. *                                     [3] = expN: row for box top
  139. *                                     [4] = expN: message row
  140. *                                     [5] = expN: time out
  141. *                                     [6] = expC: color for init bottom panel
  142. *                                     [7] = expC: color for init screen
  143. *                                     [8] = expN: char for init screen
  144. *                                     [9] = expC: text for init bottom panel
  145. * Calls.......: PDM_INIT()
  146. * CC.LIB Calls: ALONGEST(), ATNEXT()
  147. * Language....: Clipper S'87
  148. * Returns.....: <expL>: .T.
  149. *------------------------------------------------------------------------------*
  150. FUNCTION PDMSETUP
  151.  
  152. PRIVATE dimh, dimv, ss
  153.  
  154. *** MENUPD Horizontal ***
  155. dimh= 6
  156. PUBLIC PDM_HPROM[dimh]                  && horizontal menu prompt text
  157. PDM_HPROM[1]= " F1-Help "
  158. PDM_HPROM[2]= " F2-File/Print "
  159. PDM_HPROM[3]= " F3-Edit "
  160. PDM_HPROM[4]= " F4-Format "
  161. PDM_HPROM[5]= " F5-Dictionary "
  162. PDM_HPROM[6]= " F6-Addresses "
  163.  
  164. PUBLIC PDM_HCOLM[dimh]                  && horizontal starting columns for prompts
  165. PDM_HCOLM[1]= 0
  166. PDM_HCOLM[2]= 10
  167. PDM_HCOLM[3]= 26
  168. PDM_HCOLM[4]= 36
  169. PDM_HCOLM[5]= 48
  170. PDM_HCOLM[6]= 64
  171.  
  172. PUBLIC PDM_HOTKY[dimh]                  && horiz Hot/alt keys INKEY()
  173. PDM_HOTKY[1]= 28
  174. PDM_HOTKY[2]= -1
  175. PDM_HOTKY[3]= -2
  176. PDM_HOTKY[4]= -3
  177. PDM_HOTKY[5]= -4
  178. PDM_HOTKY[6]= -5
  179.  
  180. PUBLIC PDM_HTRIG[dimh]                  && horizontal trigger letters
  181. PDM_HTRIG[1]= " "
  182. PDM_HTRIG[2]= " "
  183. PDM_HTRIG[3]= " "
  184. PDM_HTRIG[4]= " "
  185. PDM_HTRIG[5]= " "
  186. PDM_HTRIG[6]= " "
  187.  
  188. PUBLIC PDM_HTPOS[dimh]                  && horizontal trigger letter  positions
  189. PDM_HTPOS[1]= 1
  190. PDM_HTPOS[2]= 1
  191. PDM_HTPOS[3]= 1
  192. PDM_HTPOS[4]= 1
  193. PDM_HTPOS[5]= 1
  194. PDM_HTPOS[6]= 1
  195.  
  196. *** PDMENUV Vertical ***
  197. PUBLIC PDM_VSS1[dimh]                   && starting array subscript
  198. PDM_VSS1[1]= 1
  199. PDM_VSS1[2]= 2
  200. PDM_VSS1[3]= 13
  201. PDM_VSS1[4]= 29
  202. PDM_VSS1[5]= 40
  203. PDM_VSS1[6]= 44
  204.  
  205. dimv= 49
  206. PUBLIC PDM_VPROM[dimv]                  && vertical menu prompt text
  207. PDM_VPROM[ 1]= "  1. Help Index  "
  208. PDM_VPROM[ 2]= "  1. Get file            Ctrl-G  "
  209. PDM_VPROM[ 3]= "  2. Save working copy   Ctrl-S  "
  210. PDM_VPROM[ 4]= "  3. Delete file                 "
  211. PDM_VPROM[ 5]= "-"
  212. PDM_VPROM[ 6]= "  4. Insert file                 "
  213. PDM_VPROM[ 7]= "-"
  214. PDM_VPROM[ 8]= "  5. Print working copy  Ctrl-O  "
  215. PDM_VPROM[ 9]= "-"
  216. PDM_VPROM[10]= "  6. Erase working copy          "
  217. PDM_VPROM[11]= "-"
  218. PDM_VPROM[12]= "  7. Use macros           Alt-0  "
  219. PDM_VPROM[13]= "  1. Insert blank line  Ctrl-I  "
  220. PDM_VPROM[14]= "  2. Delete word        Ctrl-W  "
  221. PDM_VPROM[15]= "  3. Delete line        Ctrl-L  "
  222. PDM_VPROM[16]= "-"
  223. PDM_VPROM[17]= "  4. Mark text          Ctrl-T  "
  224. PDM_VPROM[18]= "  5. Mark rectangle     Ctrl-R  "
  225. PDM_VPROM[19]= "  6. Paste              Ctrl-P  "
  226. PDM_VPROM[20]= "-"
  227. PDM_VPROM[21]= "  7. Boldface word      Ctrl-B  "
  228. PDM_VPROM[22]= "  8. Underline word     Ctrl-U  "
  229. PDM_VPROM[23]= "-"
  230. PDM_VPROM[24]= "  9. Draw lines                 "
  231. PDM_VPROM[25]= "-"
  232. PDM_VPROM[26]= "  A. Find & Replace     Ctrl-F  "
  233. PDM_VPROM[27]= "-"
  234. PDM_VPROM[28]= "  B. Calculate          Ctrl-M  "
  235. PDM_VPROM[29]= "  1. Set left/right margins & tabs    Ctrl-[  "
  236. PDM_VPROM[30]= "  2. Set top/bottom margins & length          "
  237. PDM_VPROM[31]= "  3. Set header                               "
  238. PDM_VPROM[32]= "  4. Set footer                               "
  239. PDM_VPROM[33]= "-"
  240. PDM_VPROM[34]= "  5. Turn indent on/off               Ctrl-N  "
  241. PDM_VPROM[35]= "  6. Turn double spacing on/off       Ctrl-D  "
  242. PDM_VPROM[36]= "-"
  243. PDM_VPROM[37]= "  7. Center line                      Ctrl-X  "
  244. PDM_VPROM[38]= "  8. Left justify line                        "
  245. PDM_VPROM[39]= "  9. Right justify line                       "
  246. PDM_VPROM[40]= "  1. Proof word          Ctrl-A  "
  247. PDM_VPROM[41]= "  2. Proof document      Ctrl-V  "
  248. PDM_VPROM[42]= "-"
  249. PDM_VPROM[43]= "  3. Find synonyms               "
  250. PDM_VPROM[44]= "  1. Select address book  "
  251. PDM_VPROM[45]= "-"
  252. PDM_VPROM[46]= "  2. Add an address       "
  253. PDM_VPROM[47]= "  3. Find an address      "
  254. PDM_VPROM[48]= "-"
  255. PDM_VPROM[49]= "  4. Specify copy format  "
  256.  
  257. PUBLIC PDM_VTRIG[dimv]                  && vertical trigger letters
  258. PDM_VTRIG[ 1]= "1"
  259. PDM_VTRIG[ 2]= "1"
  260. PDM_VTRIG[ 3]= "2"
  261. PDM_VTRIG[ 4]= "3"
  262. PDM_VTRIG[ 5]= "-"
  263. PDM_VTRIG[ 6]= "4"
  264. PDM_VTRIG[ 7]= "-"
  265. PDM_VTRIG[ 8]= "5"
  266. PDM_VTRIG[ 9]= "-"
  267. PDM_VTRIG[10]= "6"
  268. PDM_VTRIG[11]= "-"
  269. PDM_VTRIG[12]= "7"
  270. PDM_VTRIG[13]= "1"
  271. PDM_VTRIG[14]= "2"
  272. PDM_VTRIG[15]= "3"
  273. PDM_VTRIG[16]= "-"
  274. PDM_VTRIG[17]= "4"
  275. PDM_VTRIG[18]= "5"
  276. PDM_VTRIG[19]= "6"
  277. PDM_VTRIG[20]= "-"
  278. PDM_VTRIG[21]= "7"
  279. PDM_VTRIG[22]= "8"
  280. PDM_VTRIG[23]= "-"
  281. PDM_VTRIG[24]= "9"
  282. PDM_VTRIG[25]= "-"
  283. PDM_VTRIG[26]= "A"
  284. PDM_VTRIG[27]= "-"
  285. PDM_VTRIG[28]= "B"
  286. PDM_VTRIG[29]= "1"
  287. PDM_VTRIG[30]= "2"
  288. PDM_VTRIG[31]= "3"
  289. PDM_VTRIG[32]= "4"
  290. PDM_VTRIG[33]= "-"
  291. PDM_VTRIG[34]= "5"
  292. PDM_VTRIG[35]= "6"
  293. PDM_VTRIG[36]= "-"
  294. PDM_VTRIG[37]= "7"
  295. PDM_VTRIG[38]= "8"
  296. PDM_VTRIG[39]= "9"
  297. PDM_VTRIG[40]= "1"
  298. PDM_VTRIG[41]= "2"
  299. PDM_VTRIG[42]= "-"
  300. PDM_VTRIG[43]= "3"
  301. PDM_VTRIG[44]= "1"
  302. PDM_VTRIG[45]= "-"
  303. PDM_VTRIG[46]= "2"
  304. PDM_VTRIG[47]= "3"
  305. PDM_VTRIG[48]= "-"
  306. PDM_VTRIG[49]= "4"
  307.  
  308. PUBLIC PDM_VTPOS[dimv]                  && vertical trigger letter positions
  309. PDM_VTPOS[ 1]= 3
  310. PDM_VTPOS[ 2]= 3
  311. PDM_VTPOS[ 3]= 3
  312. PDM_VTPOS[ 4]= 3
  313. PDM_VTPOS[ 5]= 1
  314. PDM_VTPOS[ 6]= 3
  315. PDM_VTPOS[ 7]= 1
  316. PDM_VTPOS[ 8]= 3
  317. PDM_VTPOS[ 9]= 1
  318. PDM_VTPOS[10]= 3
  319. PDM_VTPOS[11]= 1
  320. PDM_VTPOS[12]= 3
  321. PDM_VTPOS[13]= 3
  322. PDM_VTPOS[14]= 3
  323. PDM_VTPOS[15]= 3
  324. PDM_VTPOS[16]= 1
  325. PDM_VTPOS[17]= 3
  326. PDM_VTPOS[18]= 3
  327. PDM_VTPOS[19]= 3
  328. PDM_VTPOS[20]= 1
  329. PDM_VTPOS[21]= 3
  330. PDM_VTPOS[22]= 3
  331. PDM_VTPOS[23]= 1
  332. PDM_VTPOS[24]= 3
  333. PDM_VTPOS[25]= 1
  334. PDM_VTPOS[26]= 3
  335. PDM_VTPOS[27]= 1
  336. PDM_VTPOS[28]= 3
  337. PDM_VTPOS[29]= 3
  338. PDM_VTPOS[30]= 3
  339. PDM_VTPOS[31]= 3
  340. PDM_VTPOS[32]= 3
  341. PDM_VTPOS[33]= 1
  342. PDM_VTPOS[34]= 3
  343. PDM_VTPOS[35]= 3
  344. PDM_VTPOS[36]= 1
  345. PDM_VTPOS[37]= 3
  346. PDM_VTPOS[38]= 3
  347. PDM_VTPOS[39]= 3
  348. PDM_VTPOS[40]= 3
  349. PDM_VTPOS[41]= 3
  350. PDM_VTPOS[42]= 1
  351. PDM_VTPOS[43]= 3
  352. PDM_VTPOS[44]= 3
  353. PDM_VTPOS[45]= 1
  354. PDM_VTPOS[46]= 3
  355. PDM_VTPOS[47]= 3
  356. PDM_VTPOS[48]= 1
  357. PDM_VTPOS[49]= 3
  358.  
  359. PUBLIC PDM_VACTV[dimv]                  && vertical active status array
  360. AFILL( PDM_VACTV, .T. )
  361. PDM_VACTV[ 5]= .F.
  362. PDM_VACTV[ 7]= .F.
  363. PDM_VACTV[ 9]= .F.
  364. PDM_VACTV[11]= .F.
  365. PDM_VACTV[16]= .F.
  366. PDM_VACTV[20]= .F.
  367. PDM_VACTV[23]= .F.
  368. PDM_VACTV[25]= .F.
  369. PDM_VACTV[27]= .F.
  370. PDM_VACTV[33]= .F.
  371. PDM_VACTV[36]= .F.
  372. PDM_VACTV[42]= .F.
  373. PDM_VACTV[45]= .F.
  374. PDM_VACTV[48]= .F.
  375.  
  376. PUBLIC PDM_COLOR[11]                    && PDM color strings for SET COLOR TO
  377. PDM_COLOR[ 1]= "BG/N"                    && [ 1] hcolor when not selected
  378. PDM_COLOR[ 2]= "BG/N"                    && [ 2] hcolor for unselected trigger
  379. PDM_COLOR[ 3]= "N/BG"                    && [ 3] hcolor for selected option
  380. PDM_COLOR[ 4]= "N/BG"                    && [ 4] hcolor for selected trigger
  381. PDM_COLOR[ 5]= "BG+/BG"                  && [ 5] vcolor for box
  382. PDM_COLOR[ 6]= "B/BG"                    && [ 6] vcolor when not selected
  383. PDM_COLOR[ 7]= "B/BG"                    && [ 7] vcolor for unselected trigger
  384. PDM_COLOR[ 8]= "N/BG"                    && [ 8] vcolor for selected option
  385. PDM_COLOR[ 9]= "N/BG"                    && [ 9] vcolor for selected trigger
  386. PDM_COLOR[10]= "R/BG"                    && [10] vcolor for inactive option
  387. PDM_COLOR[11]= "N/W"                     && [11] vcolor for message row
  388.  
  389. PUBLIC PDM_CONFG[9]                     && PDM configuration
  390. PDM_CONFG[1]= 0                          && [1] = expN: box type: 0,1,2
  391. PDM_CONFG[2]= 0                          && [2] = expN: row for horiz menu
  392. PDM_CONFG[3]= 2                          && [3] = expN: row for box top
  393. PDM_CONFG[4]= 22                         && [4] = expN: message row
  394. PDM_CONFG[5]= 0                          && [5] = expN: time out
  395. PDM_CONFG[6]= "W/B"                      && [6] = expC: color for init bottom panel
  396. PDM_CONFG[7]= "W/B"                      && [7] = expC: color for init screen
  397. PDM_CONFG[8]= 32                         && [8] = expN: char for init screen
  398. *                                        && [9] = expC: text for init bottom panel
  399. PDM_CONFG[9]= "└┴┴┴┴┼┴┴┴┴[┴┴┴┴T┴┴┴┴2┴┴┴┴┼┴┴┴┴3┴┴┴┴┼┴┴┴┴T┴┴┴┴┼┴┴┴┴5┴┴┴┴┼┴┴┴┴6┴┴┴┴┼┴┴┴┴]┴┴┴┴┼┴┴┴┘Working Copy  Inserting                                   0%      Line 1 of Pg 1Esc-Main Menu                                                                   "
  400.  
  401. PDM_INIT()                    && Initialize remaining optional PDM PUBLIC arrays
  402.  
  403. RETURN .T.                                                 && End of: PDMSETUP()
  404. *------------------------------------------------------------------------------*
  405. *<eof>